package com.service;

import com.dao.UserMapper;
import com.pojo.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService {

	@Resource
	private UserMapper userMapper;

	public User findUserByUsername(String username) {
		return userMapper.findByUsername(username);
	}

	public void registerUser(User user) {
		userMapper.insert(user);
	}
	public User selectById(Integer id) {
		return userMapper.selectById(id);
	}

	public void update(User user) {
		userMapper.update(user);
	}
}
